"use strict";
/*
* Generated from https://github.com/NewFuture/pac
* see all pac files https://pac.newfuture.cc
*/
var WhiteListHost = {
    "bt.byr.cn": true,
    "tv.byr.cn": true,
    "pt.tju.edu.cn": true,
    "vagrant.yunyin.org": true,
    "local.yunyin.org": true,
    "ieeexplore.ieee.org": true,
    "f.wanfangdata.com.cn": true,
    "www.cqvip.com": true,
    "download.cqvip.com": true,
    "gov.cn": true,
    "115.com": true,
    "123pan.com": true,
    "123957.com": true,
    "baidu.com": true,
    "baidupcs.com": true,
    "baidustatic.com": true,
    "bdimg.com": true,
    "bdstatic.com": true,
    "cdn.bcebos.com": true,
    "cdnnode.cn": true,
    "qq.com": true,
    "weixinbridge.com": true,
    "gtimg.com": true,
    "gtimg.cn": true,
    "qstatic.com": true,
    "cdn-go.cn": true,
    "qpic.cn": true,
    "qlogo.cn": true,
    "qqmail.com": true,
    "tencent.com": true,
    "bilibili.com": true,
    "hdslb.com": true,
    "bilivideo.cn": true,
    "biliapi.net": true,
    "iqiyi.com": true,
    "iqiyipic.com": true,
    "qy.net": true,
    "71edge.com": true,
    "youku.com": true,
    "ykimg.com": true,
    "tower.im": true,
    "weibo.com": true,
    "weibo.cn": true,
    "weibocdn.com": true,
    "sinaimg.cn": true,
    "sinajs.cn": true,
    "sina.cn": true,
    "taobao.com": true,
    "aliyun.com": true,
    "aliyuncs.com": true,
    "alicdn.com": true,
    "alibabausercontent.com": true,
    "alipay.com": true,
    "alipayobjects.com": true,
    "aliyundrive.com": true,
    "dingtalk.com": true,
    "mmstat.com": true,
    "tmall.com": true,
    "jd.com": true,
    "360buyimg.com": true,
    "300hu.com": true,
    "126.com": true,
    "163.com": true,
    "189.cn": true,
    "21cn.com": true,
    "139.com": true,
    "10086.cn": true,
    "pinduoduo.com": true,
    "pddpic.com": true,
    "zijieapi.com": true,
    "amemv.com": true,
    "ecombdapi.com": true,
    "baike.com": true,
    "byteimg.com": true,
    "douyin.com": true,
    "douyinpic.com": true,
    "douyinstatic.com": true,
    "douyinvod.com": true,
    "supercachenode.com": true,
    "bytedance.com": true,
    "bytedanceapi.com": true,
    "bytescm.com": true,
    "bytecdn.cn": true,
    "byteoc.com": true,
    "bytednsdoc.com": true,
    "bytetcc.com": true,
    "feishu.cn": true,
    "feishucdn.com": true,
    "toutiao.com": true,
    "toutiaoimg.com": true,
    "toutiaostatic.com": true,
    "yhgfb-cn-static.com": true,
    "cmbchina.com": true,
    "mi.com": true,
    "xiaomi.com": true,
    "amap.com": true,
    "autonavi.com": true,
    "meituan.com": true,
    "meituan.net": true,
    "sogou.com": true,
    "dianping.com": true,
    "quark.cn": true,
    "wps.cn": true,
    "wpscdn.cn": true,
    "xiaohongshu.com": true,
    "xhscdn.com": true,
    "push.apple.com": true,
    "setup.icloud.com": true,
    "appldnld.apple.com": true,
    "oscdn.apple.com": true,
    "osrecovery.apple.com": true,
    "swcdn.apple.com": true,
    "swdist.apple.com": true,
    "swdownload.apple.com": true,
    "swscan.apple.com": true,
    "updates-http.cdn-apple.com": true,
    "updates.cdn-apple.com": true,
    "audiocontentdownload.apple.com": true,
    "devimages-cdn.apple.com": true,
    "devstreaming-cdn.apple.com": true,
    "oscdn.apple.com": true,
    "certs.apple.com": true,
    "ocsp.apple.com": true,
    "ocsp2.apple.com": true,
    "valid.apple.com": true,
    "appleid.cdn-apple.com": true,
    "icloud.com.cn": true,
    "guzzoni.apple.com": true,
    "app-site-association.cdn-apple.com": true,
    "smp-device-content.apple.com": true,
    "idv.cdn-apple.com": true,
    "adcdownload.apple.com": true,
    "alpdownloadit.cdn-apple.com": true,
    "bricks.cdn-apple.com": true,
    "self.events.data.microsoft.com": true,
    "mobile.events.data.microsoft.com": true,
    "browser.events.data.microsoft.com": true,
    "ocsp.globalsign.com": true,
    "ocsp2.globalsign.com": true,
    "ocsp.digicert.cn": true,
    "ocsp.dcocsp.cn": true,
    "api.onedrive.com": true,
    "storage.live.com": true,
    "skyapi.live.net": true,
    "roaming.officeapps.live.com": true,
    "blob.core.windows.net": true,
    "default.exp-tas.com": true

};
function FindProxyForURL(url, host) {
    if (host.indexOf(".") < 0
        || WhiteListHost[host]
        || /\.nankai\.edu\.cn$/.test(host)
        || /\.nku\.cn$/.test(host)
        || /\.neu6\.edu\.cn$/.test(host)
        || /^ipv6\..*\.edu\.cn$/.test(host)
        || /.*\.mobisys\.cc$/.test(host)
        || /.*\.newfuture\.win$/.test(host)
        || /tuna\.tsinghua\.edu\.cn$/.test(host)
        || /.*zhixing\.bjtu\.edu\.cn$/.test(host)
    ) {/*Plain Host Name or in whitelist*/
        return "DIRECT";
    } else if (/^(\d{1,3}\.){3}\d{1,3}$/.test(host)
    &&(isInNet(host, "127.0.0.0", "255.255.255.0")
        || isInNet(host, "192.168.0.0", "255.255.0.0")
        || isInNet(host, "172.16.0.0", "255.240.0.0")
        || isInNet(host, "10.0.0.0", "255.0.0.0")
        || isInNet(host, "202.113.16.0", "255.255.240.0")
        || isInNet(host, "202.113.224.0", "255.255.240.0")
        || isInNet(host, "222.30.61.0", "255.255.225.0"))
    ) {/*Intranet IP*/
        return "DIRECT";
    }
    return "SOCKS5 127.0.0.1:1080";
};
